package cn.edu.glut.dto;

import javax.validation.constraints.NotNull;

import org.springframework.beans.BeanUtils;

import cn.edu.glut.entity.Major;
import cn.edu.glut.utils.ValidValue;
import lombok.Data;

@Data
public class MajorInputDTO implements DTOConvert<Major>{
	private String id;	//该项在更新的时候不能为空，请注意检查
	@NotNull(message = ValidValue.Valid_MSG.NAME_NOT_NULL)
	private String name; // 专业名称
	private String description; // 描述
	
	@Override
	public Major convertToEntity() {
		Major major = new Major();
		BeanUtils.copyProperties(this, major);
		return major;
	}
	
}
